package com.shujia.permission.sub;

import com.shujia.permission.Student;

public class Pupil extends Student {

    public void playGame() {
        // 通过对象, 和直接访问都不行
        // System.out.println(grade);
        Student student = new Student();
        // student.grade;
        // student.age = 11;

        // protected 修饰的成员在子类直接访问, 不需要创建对象
        age = 12;
        System.out.println(age);

        name = "zs";
        System.out.println(name);
    }
}
